<!-- src/components/ThemeSwitcher.vue -->
<template>
    <v-btn icon @click="toggleTheme">
      <v-icon>{{ themeIcon }}</v-icon>
  
    </v-btn>
  
  </template>
  
  <script>
  import { mapState, mapActions } from 'vuex'
  
  export default {
    name: 'ThemeSwitcher',
    computed: {
      ...mapState(['appTheme']),
      themeIcon() {
        return this.appTheme === 'light' ? 'mdi-weather-night' : 'mdi-white-balance-sunny'
      },
    },
    methods: {
      ...mapActions(['toggleTheme']),
    },
  }
  </script>
  